/**
 * Created with IntelliJ IDEA.
 * User: yanshiyi
 * Date: 13-11-28
 * Time: 下午8:36
 * To change this template use File | Settings | File Templates.
 */
package animals

var Animals = []Animal{&Dog{}, &Cat{}, Llama{}, JavaProgrammer{}}

type Animal interface {
	Speak() string
}

type Dog struct {
}

func (d Dog) Speak() string {
	return "Woof!"
}

type Cat struct {
	name string
}

func (c *Cat) Speak() string {
	return "meoow"
}

type Llama struct {
}

func (l Llama) Speak() string {
	return "?????"
}

type JavaProgrammer struct {
}

func (j JavaProgrammer) Speak() string {
	return "Design patterns!"
}

